package cn.good.biz.service;

import cn.good.mapper.CollectMapper;
import cn.good.pojo.Collect;
import cn.good.service.CollectService;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.Map;

@Service(interfaceClass = CollectService.class)
@Component
public class CollectServiceImpl implements CollectService{

    @Resource
    private CollectMapper collectMapper;
    @Override
    public void articleCollect(Collect collect) throws Exception {
        collectMapper.updateByPrimaryKeySelective(collect);
    }

    @Override
    public void insertCollect(Collect collect) throws Exception {
        collectMapper.insert(collect);
    }

    @Override
    public Collect findCollect(Map<String, Object> param) throws Exception {
        return collectMapper.findCollectByMap(param);
    }
}
